<?php
include_once("./_common.php");

$map_key = "77de4ca6328d2a037e70b1ced140c127";


$addr1 = $_POST['a'];
$addr2 = $_POST['b'];

$addr_str = $addr1." ".$addr2;
$addr_str = preg_replace("/\s+/","",$addr1.$addr2);
$request = "http://openapi.map.naver.com/api/geocode.php?key=$map_key&encoding=utf-8&coord=LatLng&query=".$addr_str;

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $request);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$g = curl_exec($ch);
curl_close($ch);
echo $g;
?>
